<template>
    <div :class="`bigScreen ${screenStatus ? 'full' : ''}`">
        <div style="margin: 20px">
            <div style="margin: 20px;font-size: 20px;font-weight: bold;">
               <div style="background-color: green;width: 4px;height: 18px;display: inline-block;"></div> 设备
            </div>

            <a-row :gutter="20">
                <a-col :span="6">
                    <a-card class="chart-card" shadow="hover">
                        <div class="card-show flex-between">
                            <div class="card-left">
                                <div class="card-title">摄像头数量</div>
                                <div class="card-value">
                                    {{ cameraCount }}
                                    <span class="card-unit">个</span>
                                </div>
                            </div>
                            <div class="card-right">
                                <img src="../../../assets/images/device/card-show01.png" alt="" class="card-img" />
                            </div>
                        </div>
                        <!-- <div class="card-content flex-between">
                            <div class="card-label">
                                <i class="card-point" style="background-color: #13ce66"></i>
                                在线
                            </div>
                            <div class="card-label">
                                {{ deviceStatistic.deviceOnlineCount }}
                            </div>
                            <div class="card-label">
                                <i class="card-point" style="background-color: #ff4949"></i>
                                离线
                            </div>
                            <div class="card-label">
                                {{ deviceStatistic.deviceOfflineCount }}
                            </div>
                        </div> -->
                    </a-card>
                </a-col>
            

            </a-row>


            <div style="margin: 20px;font-size: 20px;font-weight: bold;">
               <div style="background-color: green;width: 4px;height: 18px;display: inline-block;"></div> 车辆
            </div>

            <a-row :gutter="20">
               
                <a-col :span="6">
                    <a-card class="chart-card" shadow="hover">
                        <div class="card-show flex-between">
                            <div class="card-left">
                                <div class="card-title">可通行数量</div>
                                <div class="card-value">
                                    {{ carTongxing }}
                                    <span class="card-unit">个</span>
                                </div>
                            </div>
                            <div class="card-right">
                                <img src="../../../assets/images/device/card-show02.png" alt="" class="card-img" />
                            </div>
                        </div>
                        <!-- <div class="card-content flex-between">
                            <div class="card-label">
                                <i class="card-point" style="background-color: #13ce66"></i>
                                已完成
                            </div>
                            <div class="card-label">{{ deviceStatistic.devOpsTaskVoNotProcessedCount }}</div>
                            <div class="card-label">
                                <i class="card-point" style="background-color: #ff4949"></i>
                                未完成
                            </div>
                            <div class="card-label">{{ deviceStatistic.devOpsTaskVoProcessedCount }}</div>
                        </div> -->
                    </a-card>
                </a-col>
                <a-col :span="6">
                    <a-card class="chart-card" shadow="hover">
                        <div class="card-show flex-between">
                            <div class="card-left">
                                <div class="card-title">不可通行数量</div>
                                <div class="card-value">
                                    {{ bucarTongxing }}
                                    <span class="card-unit">个</span>
                                </div>
                            </div>
                            <div class="card-right">
                                <img src="../../../assets/images/device/card-show02.png" alt="" class="card-img" />
                            </div>
                        </div>
                        <!-- <div class="card-content flex-between">
                            <div class="card-label">
                                <i class="card-point" style="background-color: #13ce66"></i>
                                已完成
                            </div>
                            <div class="card-label">{{ deviceStatistic.devOpsTaskVoNotProcessedCount }}</div>
                            <div class="card-label">
                                <i class="card-point" style="background-color: #ff4949"></i>
                                未完成
                            </div>
                            <div class="card-label">{{ deviceStatistic.devOpsTaskVoProcessedCount }}</div>
                        </div> -->
                    </a-card>
                </a-col>

            </a-row>
        </div>


    </div>
</template>

<script>

import { statisticApi } from '/@/api/licensePlate/statistic/api';


export default {
    name: 'bigScreen',
    data() {
        return {
            cameraCount: 0,//摄像头数量
            carTongxing: 0,//通行数量
            bucarTongxing: 0
        };
    },
    created() {

    },
    methods: {
        /** 查询设备统计信息 */
        getDeviceStatistic() {
            statisticApi.cameraDevicesqueryCount().then((response) => {
                this.cameraCount = response.data
            });
        },

        getcar_detailsqueryCount() {
            let obj = {
                type: 1,
                status: 1
            }
            statisticApi.car_detailsqueryCount(obj).then((response) => {
                this.carTongxing = response.data
            });
            let obj2 = {
                type: 1,
                status: 0
            }
            statisticApi.car_detailsqueryCount(obj2).then((response) => {
                this.bucarTongxing = response.data
            });
        }
    },
    mounted() {
        this.getDeviceStatistic();
        this.getcar_detailsqueryCount();

    },
};
</script>
<style>
/* @import './index.css'; */

/* .el-card .chart-outer{
    width: 100% !important;
}
.el-card .chart-outer div:nth-child(1){
    width: 100% !important;
}
.el-card .chart-outer div:nth-child(1) canvas{
    width: 100% !important;
} */
.bigScreen .chart-card .card-show .card-left .card-title {
    font-size: 18px;
}

.bigScreen .chart-card .card-show .card-left .card-value {
    font-size: 32px;
    margin: 20px 0;
}

.bigScreen .chart-card .card-show .card-left .card-value .card-unit {
    color: #999;
    font-size: 16px;
}

.bigScreen .chart-card .card-content .card-label {
    font-size: 16px;
    line-height: 30px;
}

.bigScreen .chart-card .card-content .card-label .card-point {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
}
</style>
